import i18n from '@/lang'
// translate router.meta.title, be used in breadcrumb sidebar tagsview
export function generateTitle(title) {
    const hasKey = i18n.te('menu.' + title)
    if (hasKey) {
        // $t :this method from vue-i18n, inject in @/lang/index.js
        const translatedTitle = i18n.t('menu.' + title)

        return translatedTitle
    }
    return title
}
  